package com.china08.yxyapi.repository.mg;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import com.china08.yxyapi.entity.mg.sws.SwsAlbums;

public interface YxySwsAlbumsRepository extends MongoRepository<SwsAlbums, String> {

    List<SwsAlbums> findBySchoolId(String schoolId);

    SwsAlbums findById(String id);

    Page<SwsAlbums> findBySchoolId(String schoolId, Pageable pageable);

    Page<SwsAlbums> findBySchoolIdAndImageCountNot(String schoolId, Integer imageCount, Pageable pageable);

    List<SwsAlbums> findTop20BySchoolIdOrderByCreatedDateDesc(String schoolId);

    List<SwsAlbums> findTop20BySchoolIdOrderByAlbumsDateAsc(String schoolId);

    List<SwsAlbums> findTop20BySchoolIdOrderByAlbumsDateDesc(String schoolId);

}
